Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / View-Related Objects Reference
View Port Functions / Retrieving the View Ports That Intersect a Shape


GXGetShapeGlobalViewPorts

You can use the GXGetShapeGlobalViewPorts function to determine all of the view ports that intersect the area of a shape.

long GXGetShapeGlobalViewPorts(gxShape source, gxViewPort list[]);
source
A reference to the shape whose view ports you wish to examine.
list
An array of view port references. On return, contains the references to the view ports that the shape can draw to.
function result
The number of view port references in the list array.
DESCRIPTION
The GXGetShapeGlobalViewPorts function retrieves a list of the view ports that the source shape may draw to. If a view port is specified in the transform object associated with the shape, and if the transformed shape is not completely clipped by the view port's clip shape, the view port is put in the list returned by this function. The view ports need not all be in the same view group.

If you set the list parameter to nil, GXGetShapeGlobalViewPorts does not fill
out the list of references; it only returns the number of view port references that would be in the list (which may be 0). Thus, you typically call this function twice: first to get the size of array to allocate for the list parameter, and second to retrieve the list itself.

As one application of this function, you could first call GXGetShapeGlobalViewPorts to determine the view ports to which a shape is drawn. You then could use the view ports in calls to GXGetShapeGlobalViewDevices, to determine the view devices a given shape would be drawn to.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
SEE ALSO
The GXGetShapeGlobalViewDevices function is described on page 7-115.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996